﻿package {
	import flash.events.TimerEvent;
	import flash.utils.getTimer;
	import flash.utils.Timer;
	import org.flixel.*;
	
	public class StatePlay extends State {
		public var _tTimer:Timer;
		public var _tTimerPower:Timer;
		
		override public function create():void {
			super.create()
			
			/* _player begins here, for now. Reset method is a reinicialization of all 
			 * variables of a class, the _player belongs to State parent, but we want
			 * consider here as the first inicialization 
			 */
			_player.reset(300, 420);
			_player.updateTries(2);
			_player.updateScore(0);
			_hud.setTries(3);
			_hud.updateTries(0);
			
			add(_enemyShip.add(new Threat(Enemy.waiting_state, Enemy.from_center, 300, 0)));
			//add(_powerUp.add(new PowerUp(PowerUp.speedup, 10, 10)));

            FlxG.flash.start(0xfffffffff);
			FlxG.playMusic(ResourceManager.music);
		}
		
		override public function update():void {
			super.update();
		}
	}
}
